package com.learn.security.core.properties;

import com.learn.security.core.properties.enums.LoginType;

/**
 * 管理browser可配置属性的类
 */
public class BrowserProperties {

    private SessionProperties session = new SessionProperties();

    /**
     * 默认登录页
     */
    private String loginPage = SecurityConstants.DEFAULT_LOGIN_PAGE_URL;

    /**
     * 默认注册页
     */
    private String signUpUrl = SecurityConstants.DEFAULT_SIGN_UP_URL;

    /**
     * 默认登出处理页
     */
    private String logoutUrl = SecurityConstants.DEFAULT_LOGOUT_URL;

    /**
     * 默认登出成功页
     */
    private String signOutUrl;

    /**
     * 默认登录成功返回方式
      */
    private LoginType loginType = LoginType.REDIRECT;

    /**
     * 记住我的时间（单位：秒）
     */
    private int rememberMeSeconds = 3600;

    public SessionProperties getSession() {
        return session;
    }

    public void setSession(SessionProperties session) {
        this.session = session;
    }

    public String getLoginPage() {
        return loginPage;
    }

    public void setLoginPage(String loginPage) {
        this.loginPage = loginPage;
    }

    public String getSignUpUrl() {
        return signUpUrl;
    }

    public void setSignUpUrl(String signUpUrl) {
        this.signUpUrl = signUpUrl;
    }

    public LoginType getLoginType() {
        return loginType;
    }

    public void setLoginType(LoginType loginType) {
        this.loginType = loginType;
    }

    public int getRememberMeSeconds() {
        return rememberMeSeconds;
    }

    public void setRememberMeSeconds(int rememberMeSeconds) {
        this.rememberMeSeconds = rememberMeSeconds;
    }

    public String getLogoutUrl() {
        return logoutUrl;
    }

    public void setLogoutUrl(String logoutUrl) {
        this.logoutUrl = logoutUrl;
    }

    public String getSignOutUrl() {
        return signOutUrl;
    }

    public void setSignOutUrl(String signOutUrl) {
        this.signOutUrl = signOutUrl;
    }
}
